<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Inspire - Admin and Dashboard Template</title>
    <link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/assets/fonts/line-icons.css">
    <link rel="stylesheet" type="text/css" href="/assets/css/main.css">
    <link rel="stylesheet" type="text/css" href="/assets/css/responsive.css">
</head>
<body>
<div class="card-header border-bottom">
    <h4 class="card-title">商品修改界面</h4>
</div>
<div class="card-body">
    <div class="row">
        <div class="col-lg-10 col-md-12 col-xs-12">
            <form role="form" id="form-validation" novalidate="novalidate">
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label control-label">库存</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="stock"  th:value="${commoditySee.stock}">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label control-label">单价</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="price" th:value="${commoditySee.price}">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label control-label">状态</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="state" th:value="${commoditySee.state}" >
                    </div>
                </div>
                <input type="button" class="btn btn-common" id="baocun" value="保存"></input>
                <input type="button" class="btn btn-common" value="返回"></input>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    $("#baocun").bind("click", function () {
        var id=[[${commoditySee.id}]]
        if(!confirm("确定保存吗")) return
        toJump("/commodity/update",$("#form-validation").serialize()+"&id="+id)
    })
</script>
<script src="/assets/js/jquery-min.js"></script>
<script src="/assets/js/popper.min.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/jquery.app.js"></script>
<script src="/assets/js/main.js"></script>
</body>
</html>
